﻿app.controller("panel-manager", ["$scope", "$timeout", "panelService",
    function ($scope, $timeout, panelService) {

        $scope.scratchPanel = {
            name: null,
            dwellInSeconds: 30,
            active: false
        };


        $scope.init = function() {
        };

        $scope.startAddPanel = function() {
            $scope.scratchPanel.active = true;
        };

        $scope.completeAddPanel = function () {
            // save panel
            $scope.scratchPanel.active = false;
        };
        $scope.cancelAddPanel = function() {
            $scope.scratchPanel.active = false;
        };

        $timeout(function() {
            $scope.init();
        }, 5);
    }
]);